package com.dd.cloud.user.mapper.chknowl;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dd.cloud.user.entity.chknowl.ChknowlBooksPresent;
import com.dd.cloud.user.req.chknowl.ChBooksPageReq;
import com.dd.cloud.user.res.chknowl.ChBooksCategoryRes;
import com.dd.cloud.user.res.chknowl.ChknowlBooksPresentPageRes;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 古典书籍内容表 Mapper 接口
 * </p>
 *
 * @author czg
 * @since 2022-07-04
 */
public interface ChknowlBooksPresentMapper extends BaseMapper<ChknowlBooksPresent> {
    //获取所有书籍大类
    List<ChBooksCategoryRes> getCategory();

    /**
     * 分类查询书籍
     * @param req
     * @return
     */
    Page<ChknowlBooksPresentPageRes> getBooksPresentPage(Page page, ChBooksPageReq req);

    /**
     * 查询单个书籍
     * @param req
     * @return
     */
    ChknowlBooksPresentPageRes getBooksPresentPage(@Param("req") ChBooksPageReq req);
}
